﻿@model ValidationDemo.Models.EmployeeInfo
@{
    ViewBag.Title = "Index";
}

<h2>Validation Demo</h2>

@Html.ValidationSummary()
@using (Html.BeginForm("Validate", "MyValidator"))
{
    <div>Full Name:</div>
    @Html.TextBoxFor(e=>e.FullName)
    @Html.ValidationMessageFor(e=>e.FullName)
    
    <div>Age:</div>
    @Html.TextBoxFor(e=>e.Age)
    @Html.ValidationMessageFor(e=>e.Age)
    
    <br /><br />
    <button>Validate</button>
}

@section scripts{
    @Scripts.Render("~/bundles/jqueryval")
}